#include "qresourcetoplevelwidget.h"

#include "qresourcetreeview.h"
#include <QVBoxLayout>

QResourceTopLevelWidget::QResourceTopLevelWidget(AbstractCore *core, QWidget *parent):
    QWidget(parent),
    m_treeView(new QResourceTreeView(core,this)),
    m_core(core)
{
    QVBoxLayout *l=new QVBoxLayout(this);
    l->setMargin(0);
    l->setSpacing(0);
    l->addWidget(m_treeView);

    connect(m_treeView,SIGNAL(selectChange()),this,SIGNAL(selectChange()));
}

void QResourceTopLevelWidget::addTopFile(QString str)
{
    m_treeView->addFile(str);
}

void QResourceTopLevelWidget::removeTopFile(QString str)
{
    m_treeView->removeFile(str);
}

void QResourceTopLevelWidget::select(QString str)
{
    m_treeView->select(str);
}

QString QResourceTopLevelWidget::getSelect()
{
    return m_treeView->getSelect();
}
